/*-
 * Copyright (c) 2013 Shang-Rong Cai. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * $ MTBLAS: cor_ctrl.h    Rev. 0.0.5    2013-10-31T00:03+08:00 $
 */

#ifndef COR_CTRL_H
#define COR_CTRL_H

#ifndef BLAS_FLAGS
#define BLAS_FLAGS
#define MTBLAS_ROW_MAJOR   101
#define MTBLAS_COL_MAJOR   102

#define MTBLAS_TRANS_NONE  111
#define MTBLAS_TRANS       112
#define MTBLAS_TRANS_CONJ  113

#define MTBLAS_UPLO_UPPER  121
#define MTBLAS_UPLO_LOWER  122

#define MTBLAS_DIAG_NONE   131
#define MTBLAS_DIAG_UNIT   132

#define MTBLAS_SIDE_LEFT   141
#define MTBLAS_SIDE_RIGHT  142
#endif


#define GEMV_CATEGORY_0 0
#define GEMV_CATEGORY_1 1


#define GEMM_CATEGORY_0 0
#define GEMM_CATEGORY_1 1
#define GEMM_CATEGORY_2 2
#define GEMM_CATEGORY_3 3

#define GEMM_CATEGORY_4 4
#define GEMM_CATEGORY_5 5
#define GEMM_CATEGORY_6 6
#define GEMM_CATEGORY_7 7


extern int cor_ctrl_gemv_flag(const int rdr, const int trn, int *flag);

extern int cor_ctrl_gemv_size(const int trn, const size_t rz, const size_t cz, size_t *r_sz, size_t *c_sz);


extern int cor_ctrl_gemm_flag(const int rdr, const int trna, const int trnb, int *flag);

#endif
